package com.example.badyloans.config;

import io.swagger.annotations.Api;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @author 啊桥哦
 * @Description:
 * @date 2020-07-12 14:02
 */
@Configuration
@EnableSwagger2
public class Swagger2Config {
//xmind
    @Bean
    public Docket createDocket(){
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(new ApiInfo("宝贝投接口文档",
                        "用于宝贝投项目的接口测试及记录",
                        "V1.0",null,null,null,null))
                .select()
                .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
                .build();
    }
}
